package com.ruoyi.system.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Date;

/**
 * 优惠券对象 sys_coupon
 *
 * @author zyy
 * @date 2024-04-16
 */
public class SysCoupon extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 优惠券 id */
    private String id;

    /** 优惠券名称 */
    @Excel(name = "优惠券名称")
    private String name;

    /** 满减条件 */
    @Excel(name = "满减条件")
    private String condition;

    /** 卡有效开始时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "卡有效开始时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date startAt;

    /** 卡失效日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "卡失效日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date endAt;

    /** 描述信息 */
    @Excel(name = "描述信息")
    private String description;

    /** 不可用原因 */
    @Excel(name = "不可用原因")
    private String reason;

    /** 折扣券优惠金额 */
    @Excel(name = "折扣券优惠金额")
    private Integer value;

    /** 折扣券优惠金额文案 */
    @Excel(name = "折扣券优惠金额文案")
    private String valueDesc;

    /** 单位文案 */
    @Excel(name = "单位文案")
    private String unitDesc;

    public void setId(String id)
    {
        this.id = id;
    }

    public String getId()
    {
        return id;
    }
    public void setName(String name)
    {
        this.name = name;
    }

    public String getName()
    {
        return name;
    }
    public void setCondition(String condition)
    {
        this.condition = condition;
    }

    public String getCondition()
    {
        return condition;
    }
    public void setStartAt(Date startAt)
    {
        this.startAt = startAt;
    }

    public Date getStartAt()
    {
        return startAt;
    }
    public void setEndAt(Date endAt)
    {
        this.endAt = endAt;
    }

    public Date getEndAt()
    {
        return endAt;
    }
    public void setDescription(String description)
    {
        this.description = description;
    }

    public String getDescription()
    {
        return description;
    }
    public void setReason(String reason)
    {
        this.reason = reason;
    }

    public String getReason()
    {
        return reason;
    }
    public void setValue(Integer value)
    {
        this.value = value;
    }

    public Integer getValue()
    {
        return value;
    }
    public void setValueDesc(String valueDesc)
    {
        this.valueDesc = valueDesc;
    }

    public String getValueDesc()
    {
        return valueDesc;
    }
    public void setUnitDesc(String unitDesc)
    {
        this.unitDesc = unitDesc;
    }

    public String getUnitDesc()
    {
        return unitDesc;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("name", getName())
                .append("condition", getCondition())
                .append("startAt", getStartAt())
                .append("endAt", getEndAt())
                .append("description", getDescription())
                .append("reason", getReason())
                .append("value", getValue())
                .append("valueDesc", getValueDesc())
                .append("unitDesc", getUnitDesc())
                .toString();
    }
}
